﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CashInfo.ascx.cs" Inherits="TCKQKL.FrontEnd.Web.Controls.CashInfo" %>
<link href="../styles/data.css" rel="stylesheet" type="text/css" />
<%@ Import Namespace="TCKQKL.FrontEnd.DataModel" %>
<%@ Import Namespace="TCKQKL.FrontEnd.Config" %>
<% if (banks != null)
       if (banks.Count > 0)
       {%>
<table class="data" style="border: none; width: 170px;">
    <%for (int i = 0; i < banks.Count; i++)
      { %>
    <tr>
        <th colspan="2" style="text-align: left; padding-left: 5px">
            TÀI KHOẢN TIỀN
        </th>
    </tr>
    <tr>
        <td>
            Giao dịch
        </td>
        <td class="InnerData">
            <%=((banks[i].tradingAmount - peddingCost) < 0) ? "<span style=\"color: red;\">" 
               + (banks[i].tradingAmount - peddingCost).ToString("N0") + "</span>" 
               : "<span style=\"color: green;\">"
               + (banks[i].tradingAmount - peddingCost).ToString("N0") + "</span>"%>
        </td>
    </tr>
    <tr>
        <td>
            Chờ về
        </td>
        <td class="InnerData">
            <%=banks[i].nettingAmount.ToString("N0")%>
        </td>
    </tr>
    <tr>
        <td>
            Đã bán
        </td>
        <td class="InnerData">
            <%=banks[i].blockAmount.ToString("N0")%>
        </td>
    </tr>
    <tr>
        <td>
            Tổng
        </td>
        <td class="InnerData" style="font-weight: bold;">
            <%=((banks[i].tradingAmount + banks[i].nettingAmount - peddingCost) < 0) ? "<span style=\"color: red;\">" + (banks[i].tradingAmount + banks[i].nettingAmount - peddingCost).ToString("N0") + "</span>" : "<span style=\"color: green;\">" + (banks[i].tradingAmount + banks[i].nettingAmount - peddingCost).ToString("N0") + "</span>"%>
        </td>
    </tr>
    <%}%>
</table>
<%}%>